import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    btnList: [
      {
        id: 1,
        name: "总进线",
        type: "AH1_IPA",
        current: "202.1A",
        value: 202.1,
        max:202.1,
        path: '/home'
      },
      {
        id: 2,
        name: "450变压器",
        type: "AH5_IPA",
        current: "72.2A",
        value: 72.2,
        max:100,
        path: '/transformer'
      },
      {
        id: 3,
        name: "放电变压器",
        type: "AH6_IPA",
        current: "72.2A",
        value: 72.2,
        max:100,
        path: '/discharge'
      },
      {
        id: 4,
        name: "分离变压器",
        type: "AH7_IPA",
        current: "57.7A",
        value: 57.7,
        max: 80,
        path: '/separation'
      },
    ],
    DataAH1:[],
    DataAH5:[],
    DataAH6:[],
    DataAH7:[],
    AH1ID: 0,
    AH5ID: 0,
    AH6ID: 0,
    AH7ID: 0,
    flag: true,
  },
  getters: {

  },
  mutations: {
    setDataAH1(state, data) {
      state.DataAH1 = data;
    },
    setDataAH5(state, data) {
      state.DataAH5 = data;
    },
    setDataAH6(state, data) {
      state.DataAH6 = data;
    },
    setDataAH7(state, data) {
      state.DataAH7 = data;
    },
    setFlag(state, boolean) {
      state.flag = boolean;
    },
    setAH1ID(state, id) {
      state.AH1ID = id;
    },
    setAH5ID(state, id) {
      state.AH5ID = id;
    },
    setAH6ID(state, id) {
      state.AH6ID = id;
    },
    setAH7ID(state, id) {
      state.AH7ID = id;
    },
  },
  actions: {
  },
  modules: {
  }
})
